package com.xujie.sportsmeeting.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.*;

/**
 * 裁判员DTO
 */
@Data
@Schema(description = "裁判员DTO")
public class JudgeDTO {
    
    @Schema(description = "工号")
    @NotBlank(message = "工号不能为空")
    @Size(min = 3, max = 20, message = "工号长度必须在3-20个字符之间")
    private String workNumber;
    
    @Schema(description = "真实姓名")
    @NotBlank(message = "姓名不能为空")
    @Size(min = 2, max = 20, message = "姓名长度必须在2-20个字符之间")
    private String realName;
    
    @Schema(description = "性别：0-男，1-女")
    @NotNull(message = "性别不能为空")
    @Min(value = 0, message = "性别值错误")
    @Max(value = 1, message = "性别值错误")
    private Integer gender;
    
    @Schema(description = "手机号")
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "手机号格式不正确")
    private String phone;
    
    @Schema(description = "邮箱")
    @Email(message = "邮箱格式不正确")
    private String email;
    
    @Schema(description = "部门")
    @NotBlank(message = "部门不能为空")
    @Size(max = 50, message = "部门名称长度不能超过50个字符")
    private String department;
    
    @Schema(description = "专业等级")
    @NotBlank(message = "专业等级不能为空")
    @Size(max = 20, message = "专业等级长度不能超过20个字符")
    private String professionalLevel;
    
    @Schema(description = "专业特长")
    @Size(max = 200, message = "专业特长长度不能超过200个字符")
    private String speciality;
    
    @Schema(description = "资格证书")
    @Size(max = 200, message = "资格证书长度不能超过200个字符")
    private String certificate;
    
    @Schema(description = "执裁经验年数")
    @NotNull(message = "执裁经验年数不能为空")
    @Min(value = 0, message = "执裁经验年数不能小于0")
    @Max(value = 50, message = "执裁经验年数不能超过50")
    private Integer experienceYears;
    
    @Schema(description = "状态：0-禁用，1-正常")
    @NotNull(message = "状态不能为空")
    @Min(value = 0, message = "状态值错误")
    @Max(value = 1, message = "状态值错误")
    private Integer status;
}